<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/views/common/resources.jsp"%>
<!DOCTYPE html>
<html>
<head>
<script src="${basePath}/resources/js/common/plugin/jquery/jquery.min.js"></script>
<script src="${basePath}resources/js/common/main/global.js"></script>
</head>
<style type="text/css">
span {
	color: #666;
}

.mouse {
	cursor: pointer;
}
.input{
	margin-top: -5px;
}
</style>
<script type="text/javascript">
$(function(){
	$('.mouse').click(function(){
		var chose =true;
		if($(this).prev()[0].type=='checkbox'){
			if(!$(this).prev()[0].checked){
				$(this).prev()[0].checked=true;
				chose =false;
			}else if($(this).prev()[0].checked){
				$(this).prev()[0].checked=false;
			}
		}
		if($(this).prev()[0].type=='radio'){
			if(!$(this).prev()[0].checked){
				$(this).prev()[0].checked=true;
			}
		}
		APPchose(chose);
	});
	APPchose();
 	var param = window.parent.paramMap;
	$("#vehicle_no").val(param.vehicle_no);
	$("#vehicle_color").val(param.vehicle_color);
	$("#alarm_type").val(param.alarm_type);
	$("#alarm_src").val(param.alarm_src);
	$("#alarm_time").val(param.alarm_time);
	$("#handle_name").val(param.handle_name);
	$("#platform_id").val(param.platform_id);
	$("#platform_name").val(param.platform_name);
	$("#enterprise_id").val(param.enterprise_id);
	$("#enterprise_name").val(param.enterprise_name); 
	$("#alarm_area").val(param.area_id);
	$('#handle_remark').text('贵公司车牌【'+param.vehicle_no+'】于【'+global.getTime(new Date(Number(param.alarm_time)))+'】提示【'+param.alarm_type_name+'】报警；\r请核查，谢谢');
});

function APPchose(chose){
	if($('input[id="APP"]').attr('checked')=='checked'){
		$('#principal').hide();
		$('#operator').hide();
		$('#organization').hide();
		$('input[name="notice_principal"]').removeAttr('checked')
		$('input[name="notice_operator"]').removeAttr('checked')
		$('input[name="notice_organization"]').removeAttr('checked')
		if(!chose){
			$('input[name="notice_driver"]').attr('checked','checked');
		}
	}else{
		$('#principal').show();
		$('#operator').show();
		$('#organization').show();
		if(chose){
			$('input[name="notice_driver"]').removeAttr('checked');
		}
	}
	if($('input[id="EM"]').attr('checked')=='checked'){
		$('#driver').hide();
		$('input[name="notice_driver"]').removeAttr('checked');
	}else{
		$('#driver').show();
	}
}
</script>
<body class="driving">
	<form  id="saveHandle" action="" method="post">
		<div class="modal-body" style="font-size: 13px; vertical-align: middle; text-align: left; max-height: 500px; padding: 10px;">
			<div style="margin-bottom: 5px">
				<span style="padding: 20px;">处理方式:</span><input style="margin-bottom:5px;"  type="checkbox" /><span class="mouse" style="margin-left: 10px">标记为正常</span>
			</div>
			<div style="width: 455px; height: 215px; margin-bottom: 5px;">
				<span style="padding: 12px;margin-left:7px;">处理意见:</span>
				<textarea id="handle_remark" name="handle_remark" style="width: 450px; height: 200px; resize: none; margin-left: 98px; margin-top: -15px;background-color:#eef1ed;color:#61635f;"></textarea>
			</div>
			<div>
				<span style="padding: 12px;margin-left:13px;">通知渠道:</span> 
					<input style="margin-bottom:5px;" onclick="APPchose(this)" type="radio"  name="notice_type" id="APP" value="1"  checked="checked" /><span class="mouse" style="margin-left: 5px; margin-right: 20px;">APP</span>
					<input style="margin-bottom:5px;" onclick="APPchose(this)" type="radio"  name="notice_type" id="SM" value="2" /><span class="mouse" style="margin-left: 5px; margin-right: 20px;">短信</span>
					<input style="margin-bottom:5px;" onclick="APPchose(this)" type="radio"  name="notice_type" id="EM" value="3" /><span class="mouse" style="margin-left: 5px; margin-right: 20px;">邮件</span>
					<!-- <input style="margin-bottom:5px;"  type="radio"  name="notice_type"  value="4" /><span class="mouse" style="margin-left: 5px">语音下发</span> -->
			</div>
			<div style="margin-bottom: 5px">
				<span style="padding: 12px;">通知干系人:</span> 
					<span id="driver" ><input style="margin-bottom:5px;"  type="checkbox" name="notice_driver"  value="1" /><span  class="mouse" style="margin-left: 5px; margin-right: 20px;">司机</span></span>
<!-- 					<input style="margin-bottom:5px;"  type="checkbox" name="notice_monitor"  value="2" /><span  class="mouse" style="margin-left: 5px; margin-right: 20px;">监控人员</span>  -->
					<span id="principal" ><input style="margin-bottom:5px;"  type="checkbox" name="notice_principal" value="3" /><span  class="mouse" style="margin-left: 5px; margin-right: 20px;">负责人</span></span> 
					<span id="operator" ><input style="margin-bottom:5px;"  type="checkbox" name="notice_operator" value="4" /><span  class="mouse" style="margin-left: 5px; margin-right: 20px;">运营商</span></span>
					<span id="organization" ><input style="margin-bottom:5px;"  type="checkbox" name="notice_organization" value="5" /><span  class="mouse" style="margin-left: 5px">管理机构</span></span>
			</div>
			<input type="hidden" id="vehicle_no"  name="vehicle_no" value="000" >
			<input type="hidden" id="vehicle_color"  name="vehicle_color" value="" >
			<input type="hidden" id="alarm_type"  name="alarm_type" value="" >
			<input type="hidden" id="alarm_src"  name="alarm_src" value="" >
			<input type="hidden" id="alarm_time"  name="alarm_time" value="" >
			<input type="hidden" id="alarm_area"  name="alarm_area" value="" >
			<input type="hidden" id="handle_type"  name="handle_type" value="2" >
			<input type="hidden" id="handle_name"  name="handle_name" value="" >
			<input type="hidden" id="platform_id"  name="platform_id" value="" >
			<input type="hidden" id="platform_name"  name="platform_name" value="" >
			<input type="hidden" id="enterprise_id"  name="enterprise_id" value="" >
			<input type="hidden" id="enterprise_name"  name="enterprise_name" value="" >
		</div>
	</form>
</body>
</html>